﻿using System;
using System.Collections;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
using WB.Entity;
using WB.DaoHelper;
using WB.Library;
/// <summary>
/// Summary description for WebService
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
[System.Web.Script.Services.ScriptService]
public class WebService : System.Web.Services.WebService
{

    public WebService()
    {

        //Uncomment the following line if using designed components 
        //InitializeComponent(); 
    }

    [WebMethod]
    public string HelloWorld()
    {
        return "Hello World";
    }

    [WebMethod]
    public bool DeleteProduct(string id)
    {
        ProductsEntity ob = ProductsDao.Instants().SelectOne(FGuid.ToGuid(id));
        if (ob != null)
        {
            ob.IsDeleted = true;
            ob.UpdatedBy = Util.CurrentUserName;
            ob.UpdatedDate = DateTime.Now;
            ProductsDao.Instants().Update(ob);
        }
        return true;
    }
}

